//
//  KLPlistHelper.m
//  KLCurrency
//
//  Created by apple on 2017/12/28.
//  Copyright © 2017年 bonc. All rights reserved.
//

#import "KLPlistHelper.h"

#import "KLCurrencyHelper.h"

@implementation KLPlistHelper

+ (NSString *)plistFolder {
    NSString *docsDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
    NSString *path = [docsDir stringByAppendingPathComponent:@"Plist"];
    return path;
}

+ (void)buildPlistFile {
    if (![[NSFileManager defaultManager] fileExistsAtPath:[[self class] plistFolder]]) {
        [[NSFileManager defaultManager] createDirectoryAtPath:[[self class] plistFolder] withIntermediateDirectories:YES attributes:nil error:nil];
    }
}

+ (NSString *)mainCurrenciesPath {
    NSString *path = [[[self class] plistFolder] stringByAppendingPathComponent:@"main.plist"];
//    KLLog(@"main-path-%@",path);
    return path;
}

+ (NSString *)exchangeRateDictionaryPath {
    NSString *path = [[[self class] plistFolder] stringByAppendingPathComponent:@"rate.plist"];
    //    KLLog(@"rate-path-%@",path);
    return path;
}




@end
